package gui;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.GridBagLayout;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class ProfileFrame extends JFrame {

	private JPanel contentPane;
	private Container con;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ProfileFrame frame = new ProfileFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public ProfileFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 525, 386);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		setExtendedState(ProfileFrame.this.MAXIMIZED_BOTH);
		setUndecorated(true);
		
		con = getContentPane();
		con.setLayout(null);
		final ImageIcon img = new ImageIcon(ProfileFrame.class.getResource("/pics/backgroundProfile.png"));
		setSize(img.getIconWidth(), img.getIconHeight());
		
		contentPane = new JPanel(){
			public void paintComponent(Graphics g){
				Image imh = img.getImage();
				Dimension size = new Dimension(imh.getWidth(null), imh.getHeight(null));
				setPreferredSize(size);
				setMaximumSize(size);
				setMinimumSize(size);
				setSize(size);
				getContentPane().setLayout(null);
				g.drawImage(imh,  0, 0, null);
			}
		};
		
		con.add(contentPane);
		contentPane.setBounds(0, 0, img.getIconWidth(), img.getIconHeight());
		
		GridBagLayout layout = new GridBagLayout();
		
		JPanel panelContent = new JPanel(layout);
	}

}
